using System;
using System.Collections.Generic;
using ControlCenter.Model;
using MingYuanYun.Data.Abstractions;
using System.Threading.Tasks;
using ControlCenter.Model.WebApiDto;

namespace ControlCenter.Data
{
    /// <summary>
    /// 执行队列仓储接口
    /// </summary>
    public interface IExecutionQueueRepository : IRepositoryBase
    {
        /// <summary>
        /// 更新执行状态
        /// </summary>
        /// <param name="executionQueue"></param>
        /// <returns></returns>
        Task<bool> UpdateExecutionStatus(ExecutionQueue executionQueue);

        /// <summary>
        /// 查询任务日志，返回分页数据
        /// </summary>
        /// <param name="robotId"></param>
        /// <param name="rpId"></param>
        /// <param name="startRows"></param>
        /// <param name="endRows"></param>
        /// <returns></returns>
        Task<PagedData<LogQueryReturnDto>> QueryTaskLog(Guid? robotId, Guid? rpId, int startRows, int endRows);

        /// <summary>
        /// 查询任务跟踪明细日志，返回分页数据
        /// </summary>
        /// <param name="traceId"></param>
        /// <param name="startRows"></param>
        /// <param name="endRows"></param>
        /// <returns></returns>
        Task<PagedData<LogQueryReturnDto>> QueryTraceLog(Guid traceId, int startRows, int endRows);
    }
}
